class Task57:
    def run(self, array, s):
        start_index = 0
        end_index = len(array) - 1
        while start_index < end_index:
            sum = array[start_index] + array[end_index]
            if sum == s:
                return array[start_index], array[end_index]
            elif sum > s:
                end_index -= 1
            else:
                start_index += 1
        return None, None
